#include "skoczek.h"

Skoczek::Skoczek(int x, int y)
    :Figura(x, y, KON)
{
    this->czyAktywna=true;
    this->Graf='S';
}

bool Skoczek::czyMogeIsc(int x, int y, Plansza * plansza)
{
    if(this->czyAktywna == false)
        return false;

    if(((y - this->y) == 2 && (x - this->x) == 1 )|| ((this->y - y) == 1 && (this->x - x) == 2 )|| ((y - this->y == 1 && ( this->x - x)== 2) )|| ((y - this->y) == 2 && (this->x - x) == 1 )|| ((this->y - y) == 2 && (x - this->x) == 1 )|| ((this->y - y) == 1 && (x - this->x) == 2 )||((y - this->y) == 1 && (x - this->x) == 2) ||((this ->y-y)==2 &&( this->x-x)==1) )
             return true;
         else
             return false;

}

bool Skoczek::czyMogeBic(int x, int y, Plansza * plansza)
{
    return czyMogeIsc(x,y,plansza);
}
